package cn.com.zero.manager.auth.enums;

/**
 * @author guoxin
 * @version 1.0.0
 * @Description
 * @date 2023/4/3 9:36
 */
public enum LogStatusEnum {
    SUCCESS(1,0),
    DEFEATED(-1,1);

    /**
     * 状态名
     */
    private int value;
    /**
     * 状态值
     */
    private int name;

    public int getValue() {
        return value;
    }

    public void setValue(int value) {
        this.value = value;
    }

    public int getName() {
        return name;
    }

    public void setName(int name) {
        this.name = name;
    }

    LogStatusEnum(int value, int name) {
        this.value = value;
        this.name = name;
    }

    public static Integer getValueByName(int value){
        switch (value){
            case 1:
                return SUCCESS.getName();
            case -1:
                return DEFEATED.getName();
            default:
                return null;
        }
    }
}
